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BH,EAAII,WAAW,CAAC,KACnEoD,aAAc,CACX,cAEkBrD,MAAA,CAFLoD,OACZvD,EAAIyD,oBAAoB,EACxBC,cAAc,GAAG,KACpB,CACDC,OAAQ3D,EAAIM,MAAM,CAAC,EAAE,CAAGN,EAAIM,MAAM,CAAC,EAAE,CAACC,GAAG,CAAG,GAC5CwB,MAAO,CACLC,OAAQ,KACRC,KAAM,kBACNC,mBAAoB,cACtB,GAbKlC,EAAII,WAAW,SAqBpC","sources":["webpack://_N_E/?221a","webpack://_N_E/./pages/parlors-list/[code]/index.tsx","webpack://_N_E/"],"sourcesContent":["\n (window.__NEXT_P = window.__NEXT_P || []).push([\n \"/parlors-list/[code]\",\n function () {\n return require(\"private-next-pages/parlors-list/[code]/index.tsx\");\n }\n ]);\n if(module.hot) {\n module.hot.dispose(function () {\n window.__NEXT_P.push([\"/parlors-list/[code]\"])\n });\n }\n ","import { Box, Stack } from \"@mui/material\";\nimport parlors from \"goi_common/src/constants/parlors_detail.json\";\n\nimport {\n ParlorRegionHeadSection,\n ATypeCardView,\n CTypeRegionHead,\n DTypeParlorList,\n FUNERAL_SIDO,\n FUNERAL_SIGUNGU,\n ParlorDetailProps,\n numberToLocalString,\n GOI_WEB_URL,\n BTypeBreadCrumb,\n ATypeCTA,\n} from \"goi_common\";\nimport { parlorRegion } from \"@/constants/parlorRegion\";\nimport { GetStaticPaths, GetStaticProps } from \"next\";\nimport Head from \"next/head\";\n\n// Path 로직 안내\n// FUNERAL_SIDO, SIGUNGU의 key로 path 설정.\n//\n// 1. getStaticPaths 내 key,value 받아서 value(key)로 추가한 뒤 params로 넘기게 변경\n// 2. getStaticProps 내 props sido,sigungu, sidoName, sigunguName에 split,replace 로직 추가\n\nconst { regionColor, targetSidos } = parlorRegion;\n\nexport const getStaticPaths: GetStaticPaths = async () => {\n const sidoList = Array.from(FUNERAL_SIDO).filter(([key, val]) =>\n targetSidos.includes(String(key))\n );\n\n const sidoPath = sidoList.map(([key, val]) => {\n return {\n params: {\n code: `${val} 의 장례식장 목록`,\n },\n };\n });\n\n const sigunguPaths = Array.from(FUNERAL_SIDO)\n .filter(([key, val]) => targetSidos.includes(String(key)))\n .map(([sidoKey, sidoVal]) => {\n const sigungus = FUNERAL_SIGUNGU.get(sidoKey);\n if (sigungus) {\n return Array.from(sigungus).map(([sigunguKey, sigunguVal]) => {\n return {\n params: {\n code: `${sidoVal}-${sigunguVal} 의 장례식장 목록`,\n },\n };\n });\n }\n })\n .filter((i) => i != null);\n\n return {\n paths: sidoPath.concat(sigunguPaths?.flat() as Array),\n fallback: false,\n };\n};\n\nfunction getByValue(map: Map, searchValue: any) {\n for (const [key, value] of map.entries()) {\n if (value === searchValue) return key;\n }\n}\n\nexport const getStaticProps: GetStaticProps = async ({ params }) => {\n const code = params?.code as string;\n\n if (code.includes(\"-\")) {\n const [sido, sigungu] = code.split(\"-\");\n const sidoName = sido;\n const sidoNumber = getByValue(FUNERAL_SIDO, sidoName);\n const sigunguName = sigungu.replace(\" 의 장례식장 목록\", \"\");\n const sigunguNumber = getByValue(\n FUNERAL_SIGUNGU.get(sidoNumber as number) as any,\n sigunguName\n );\n\n const regionParlors = parlors.filter(\n (p) => String(p.sigungu) === String(sigunguNumber)\n );\n\n const 가족장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"가족장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 무빈소장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"무빈소\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 일반장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"일반장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n\n let parlorsString = \"\";\n regionParlors.map((p: any) => {\n parlorsString += `${p.companyname} ${numberToLocalString(\n p.binsos[0].charge\n )}원, `;\n });\n\n const description = `${sidoName} ${sigunguName} 내 ${regionParlors.length}곳의 장례식장을 대상으로 한 비용 비교: 대전, 충청 내 모든 장례식장에 대한 비용을 알아보세요. 근조화환, 실시간 빈소, 장례식장 위치 등 해당 장례식장에 필요한 정보들을 알아보세요.`;\n\n return {\n props: {\n regionParlors,\n expectedParlorPrice: { 무빈소장, 가족장, 일반장 },\n sidoName,\n sido: sidoNumber,\n sigunguName,\n sigungu: sigunguNumber,\n isSigungu: true,\n pageDescription: description,\n pageKeywords: `${sidoName} ${sigunguName} 장례식장, ${sidoName} ${sigunguName} 장례식장 추천, ${sidoName} ${sigunguName} 장례식장 비용, ${sidoName} ${sigunguName} 장례식장 평균 예상 비용, ${sidoName} ${sigunguName} 무빈소, ${sidoName} ${sigunguName} 가족장, ${sidoName} ${sigunguName} `,\n pageOgTitle: `${sidoName} ${sigunguName} 지역의 장례식장 목록, 추천, 안내 :: 충청대전세종장례소개포털`,\n pageOgDescription: description,\n pageOgImage:\n regionParlors.length > 0\n ? regionParlors[0]?.images[0]?.url || \"\"\n : \"\",\n },\n };\n } else {\n const sidoName = code.replace(\" 의 장례식장 목록\", \"\");\n const sidoNumber = getByValue(FUNERAL_SIDO, sidoName);\n const regionParlors = parlors.filter((p) => p.sido === String(sidoNumber));\n\n const 가족장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"가족장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 무빈소장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"무빈소\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n const 일반장 = Number(\n (\n regionParlors.reduce((prev, curr) => {\n return curr.expected_charge_sum[\"일반장\"] + prev;\n }, 0) / regionParlors.length\n ).toFixed(0)\n ).toLocaleString();\n\n let parlorsString = \"\";\n regionParlors.map((p: any) => {\n parlorsString += `${p.companyname} ${numberToLocalString(\n p.binsos[0].charge\n )}원, `;\n });\n\n const description = `${sidoName} 내 ${regionParlors.length}곳의 장례식장을 대상으로 한 비용 비교: 대전, 충청 내 모든 장례식장에 대한 비용을 알아보세요. 근조화환, 실시간 빈소, 장례식장 위치 등 해당 장례식장에 필요한 정보들을 알아보세요.`;\n\n return {\n props: {\n regionParlors,\n expectedParlorPrice: { 무빈소장, 가족장, 일반장 },\n sidoName,\n sido: sidoNumber,\n isSigungu: false,\n pageDescription: description,\n pageKeywords: `${sidoName} 장례식장, ${sidoName} 장례식장 추천, ${sidoName} 장례식장 비용, ${sidoName} 장례식장 평균 예상 비용, ${sidoName} 무빈소, ${sidoName} 가족장, ${sidoName} `,\n pageOgTitle: `${sidoName} 지역의 장례식장 목록, 추천, 안내 :: 충청대전세종장례소개포털`,\n pageOgDescription: description,\n pageOgImage:\n regionParlors.length > 0\n ? regionParlors[0]?.images[0]?.url || \"\"\n : \"\",\n },\n };\n }\n};\n\nexport default function ParlorSlugTypePage({\n regionParlors,\n expectedParlorPrice,\n pageOgTitle,\n sido,\n sidoName,\n sigungu,\n sigunguName,\n isSigungu,\n}: {\n regionParlors: Array;\n expectedParlorPrice: { 무빈소장: number; 가족장: number; 일반장: number };\n pageOgTitle: string;\n sido: string;\n sidoName: string;\n sigungu?: string;\n sigunguName?: string;\n isSigungu: boolean;\n}) {\n const carouselItems = regionParlors.map((res, i) => {\n return {\n \"@type\": \"ListItem\",\n name: `(비용안내) ${res.companyname}`,\n image: `${res.images[0].url}`,\n url: `https://www.ch-funeralportal.co.kr/parlor-item/${sidoName} ${sigunguName} 의 ${res.companyname}/`,\n position: i + 1,\n };\n });\n\n const carouselRichSearch =\n regionParlors.length > 6\n ? {\n \"@context\": \"http://schema.org\",\n \"@type\": \"ItemList\",\n itemListElement: carouselItems,\n }\n : {};\n\n if (regionParlors.length === 0) {\n return <>;\n }\n\n return (\n <>\n \n {pageOgTitle}\n {regionParlors.length > 5 && (\n \n )}\n \n\n \n }\n title={\n \n }\n ctaList={[]}\n />\n\n \n \n \n\n \n (\n \n )}\n />\n \n {isSigungu && (\n (\n \n )}\n />\n )}\n \n \n );\n}\n"],"names":["window","__NEXT_P","push","__webpack_require__","regionColor","parlorRegion","ParlorSlugTypePage","param","regionParlors","expectedParlorPrice","pageOgTitle","sido","sidoName","sigungu","sigunguName","isSigungu","carouselItems","map","res","i","name","concat","companyname","image","images","url","position","carouselRichSearch","length","itemListElement","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","Fragment","jsxs","Head","title","script","type","dangerouslySetInnerHTML","__html","JSON","stringify","ParlorRegionHeadSection","breadCrumb","BTypeBreadCrumb","firstItem","text","href","GOI_WEB_URL","event","domain","path","trigger_and_target","secondItem","thirdItem","undefined","goiHomeEvent","CTypeRegionHead","mainColor","ctaList","Stack","padding","ATypeCTA","style","background","c100","DTypeParlorList","binsoAveragePrice","CardViewType","FUNERAL_SIGUNGU","ATypeCardView","FUNERAL_SIDO","get","Number","descriptions","binso_average_charge","toLocaleString","imgSrc","Box"],"sourceRoot":""}